User-defined

New user-defined variables and functions of one or two variables may be declared and used anywhere.

User-defined function syntax:

        <function-name> ( <dummy-var1> {,<dummy-var2>} ) =  <expression>

where <expression> is defined in terms of <dummy-var1> and <dummy-var2>.

User-defined variable syntax:

        <variable-name> = <constant-expression>

Examples:

        w = 2
        q = floor(tan(pi/2 - 0.1))
        f(x) = sin(w*x)
        sinc(x) = sin(pi*x)/(pi*x)
        delta(t) = (t == 0)
        ramp(t) = (t > 0) ? t : 0
        min(a,b) = (a < b) ? a : b
        comb(n,k) = n!/(k!*(n-k)!)

Note that the variable pi is already defined.

See show functions and show variables.